//
//  AvaliableCouponModel.m
//  FD
//
//  Created by xiaofang wang on 2018/11/10.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//
// 可用优惠券Model

#import "AvaliableCouponModel.h"

@implementation AvaliableCouponModel
#pragma mark - key不一致
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{@"couponId":@"id"};
}

//拼接
- (NSString *)thumbnail {
    return [NSString stringWithFormat:@"%@%@",kPicDomain, _thumbnail];
}


#pragma mark - 单独转换
- (void)setRule:(NSDictionary *)rule {
    
    _rule = rule;
    if (rule) { //非空
        self.ruleGoodsArr = rule[@"goods"];
        FDLog(@"有该字段 rule :%@  数量:%ld",self.ruleGoodsArr,self.ruleGoodsArr.count);
    }else { //空
        FDLog(@"没有该字段:rule");
    }
}



//+ (NSString *)description {
//    NSArray *pty = [AvaliableCouponModel rb_objPropeties];
//    return [[self dictionaryWithValuesForKeys:pty] description];
//}

- (NSString *)description {
    NSArray *pty = [AvaliableCouponModel rb_objPropeties];
    return [[self dictionaryWithValuesForKeys:pty] description];
}
@end
